<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>预约留言管理系统</title>
    <link rel="stylesheet" href="/public/layui/css/layui.css">
    <link rel="stylesheet" href="/public/assets/css/admin.css">
    <script src="http://apps.bdimg.com/libs/jquery/1.9.0/jquery.min.js"></script>
    <script type="text/javascript" src="/Public/assets/js/echarts.min.js"></script>
</head>

<body class="layui-layout-body">
    <div class="layui-layout layui-layout-admin">
        <include file="Index/header" />
        <include file="Index/nav" />
        <div class="layui-body">
            <!-- 内容主体区域 -->
            <div style="padding: 15px;">
                <table class="layui-table" lay-data="{url:'/liuyan.php?c=liuyan&a=getliuyan&hospital',page:true,limit:15}" lay-filter="demo">
                    <thead>
                        <tr>
                            <th lay-data="{field:'id',event:'detail', width:80, sort: true}">ID</th>
                            <th lay-data="{field:'hospital',event:'detail', width:80,templet:'#hospitalTpl'}">医院</th>
                            <th lay-data="{field:'bs',event:'detail', width:80,templet:'#bsTpl'}">标识</th>
                            <th lay-data="{field:'name',event:'detail', width:80}">姓名</th>
                            <th lay-data="{field:'age',event:'detail', width:80}">年龄</th>
                            <th lay-data="{field:'sex',event:'detail', width:60,templet:'#sexTpl'}">性别</th>
                            <th lay-data="{field:'tel',event:'detail', width:120}">电话</th>
                            <th lay-data="{field:'shengao',event:'detail', width:80}">身高</th>
                            <th lay-data="{field:'ip',event:'detail', width:140}">ip地址</th>
                            <th lay-data="{field:'zzms',event:'detail', width:80}">症状描述</th>
                            <th lay-data="{field:'tjtime', event:'detail',width:140}">提交时间</th>
                            <th lay-data="{field:'address', event:'detail',width:100}">提交地址</th>
                            <th lay-data="{field:'cnmwda',event:'detail', width:100}">来源地址</th>
                            <th lay-data="{field:'zt',width:80,event:'setzt',templet:'#ztTpl'}">状态</th>
                            <th lay-data="{fixed:'right',width:80, align:'center', toolbar: '#barDemo'}">操作</th>
                        </tr>
                    </thead>
                </table>
                <script type="text/html" id="barDemo">
                    <a class="layui-btn layui-btn-danger layui-btn-mini" lay-event="del">删除</a>
                </script>
            </div>
        </div>
    </div>
    <script src="/public/layui/layui.js"></script>
    <script type="text/html" id="sexTpl">
        {{# if(d.sex === '女'){ }}
        <span style="color: #F581B1;">{{ d.sex }}</span> {{# } else { }} {{ d.sex }} {{# } }}
    </script>
    <script type="text/html" id="bsTpl">
        {{# if(d.bs === '1'){ }}
        <span>竞价</span>{{# } else if(d.bs === '2'){ }}
        <span style="color:red;">微信</span> {{# } else if(d.bs === '3'){ }}
        <span style="color:red;">外围</span> {{# } else { }}
        <span>其他</span> {{# } }}
    </script>
    <script type="text/html" id="hospitalTpl">
        {{# if(d.hospital === '1'){ }}
        <span style="color:#3470ba;">西南</span>{{# } else if(d.hospital === '2'){ }}
        <span style="color:#923222;">贵州</span> {{# } else if(d.hospital === '3'){ }}
        <span style="color:red;">太原</span> {{# } else { }}
        <span>其他</span> {{# } }}
    </script>
    <script type="text/html" id="ztTpl">
        {{# if(d.zt === '0'){ }}
        <a id="shenhe_{{ d.id }}" class="zt_{{ d.zt }}">未沟通</a> {{# } else { }} <a class="zt_{{ d.zt }}" id="shenhe_{{ d.id }}">已沟通</a> {{# } }}
    </script>
    <script src='/public/js/liuyan.js'></script>
</body>

</html>